package reflect;

import reflect.anno.AutoRunClass;
import reflect.anno.AutoRunMethod;


@AutoRunClass
public class Person {
    private String
            name="yjp";
    private int age=123;
    @AutoRunMethod(value = 10)
    public void seeHello1(){
     System.out.println(name+"你好1");
 }
     public void seeHello2(){
     System.out.println(name+"你好2");
 }
    public void seeHello3(){
     System.out.println(name+"你好3");
 }
    public void seeHello3(String info){
        System.out.println(name+":"+info);
    }
    public void seeHello3(String info,int count){
        for (int i = 0; i < count; i++) {
            System.out.println(name+":"+info);
        }
    }
    @AutoRunMethod
    public void seeHello4(){
        System.out.println(name+"我是私有的");
    }
    public Person(String name){
        this.name = name;
    }

    public Person(){
    }

    public Person(String name, int age){
        this.name = name;
        this.age = age;
    }

    @Override
    public String toString(){
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    public String getName(){
        return name;
    }

    public void setName(String name){
        this.name = name;
    }

    public int getAge(){
        return age;
    }

    public void setAge(int age){
        this.age = age;
    }
}
